home *** CD-ROM | disk | FTP | other *** search
- Unit Meta;
- Interface
-
- Uses Fastwr;
-
- {FastWrite is a Public Domain text display Package By Brian Foley
- available on Compuserve. GO BOR-100, the file is in LIB 2. You may
- modify the routines to use any other procedure you want. FASTWR.TPU
- has proven itself to be bug free and FAST! }
- Var
- MetaPos, LastLine : Integer;
-
- {LastLines value MUST be assigned here in the Meta file. It defines the lower
- border of the window around the metaphor. Therefore the maximum should be 25
- and the minimum should be Row 7 for a minimal window around the inner frame.
-
- MetaPos is a global variable used by CALC.TPU to reposition the window when
- moved on screen. }
-
- Procedure DrawCalculator;
-
- Implementation
-
- Procedure DrawCalculator;
- Begin
-
- {Usage: procedure FastWrite(St : string; Row, Col, Attr : Byte);
- The Row value of 1 is reserved for the the CALC.TPU generated window.
- The width is also fixed in this release of CALC.TPU, but you may change
- the value of LastLine to modify the window size, from the bottom up.
- The calculator always remains anchored to the top of the screen. }
-
- FastWrite('┌────────────────────────┐',3,MetaPos,7);
- FastWrite('│ │',4,MetaPos,7);
- FastWrite('└────────────────────────┘',5,MetaPos,7);
- {Unless you want only the result in its own small window, use this
- "inner window" to frame the numeric data, which allways appears on Row 4.}
- FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌────┐',6,MetaPos,7);
- FastWrite('│7│ │8│ │9│ │C│ │E│ │Esc.│',7,MetaPos,7);
- FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │ to │',8,MetaPos,7);
- FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ├────┤',9,MetaPos,7);
- FastWrite('│4│ │5│ │6│ │+│ │-│ │Quit│',10,MetaPos,7);
- FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │ │',11,MetaPos,7);
- FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ├────┤',12,MetaPos,7);
- FastWrite('│1│ │2│ │3│ │/│ │*│ │F10 │',13,MetaPos,7);
- FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │ to │',14,MetaPos,7);
- FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─────┐ ├────┤',15,MetaPos,7);
- FastWrite('│0│ │∙│ │=│ │ - │ │Ins.│',16,MetaPos,7);
- FastWrite('└─┘ └─┘ └─┘ └─────┘ └────┘',17,MetaPos,7);
- end;
- Begin
- (* Meta*)
- LastLine := 18;
-
- { Lastline Must be set to define the position of the bottom of the window.
- Note that it is one more that the last row in the FastWrite calls above. }
-
- end.